﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EdexApiClient.api.v2
{
    public partial class EdexApiContext
    {
        public async Task ChangeUserInfo(SEC_USERS user)
        {
            var uri = System.IO.Path.Combine(this.RootUri, "profile/ChangeUserInfo/?api_key={0}");
            uri = String.Format(uri, this.api_key);

            await this.Post<SEC_USERS>(uri, user);
        }

        public async Task ChangePassword(string password)
        {
            var uri = System.IO.Path.Combine(this.RootUri, "profile/ChangePassword/?api_key={0}&password={1}");
            uri = String.Format(uri, this.api_key, password);

            await this.GetData(uri);
        }

        public async Task ResetPassword(string email)
        {
            var uri = System.IO.Path.Combine(this.RootUri, "profile/ResetPassword/?email={0}");
            uri = String.Format(uri, email);

            await this.GetData(uri);
        }
    }
}
